package com.sinothk.gpserver.modules.biz.mapper;

import com.sinothk.gpserver.modules.biz.entity.AppVersionEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * <p>
 * 移动端版本功能 Mapper 接口
 * </p>
 *
 * @author Liang Y.t.
 * @since 2021-09-14
 */
@Mapper
@Repository
public interface AppVersionMapper extends BaseMapper<AppVersionEntity> {

    @Select("SELECT a.* FROM biz_app_version a WHERE a.ver_code = (SELECT MAX(b.ver_code) FROM biz_app_version b)")
    AppVersionEntity lastVersion();

}
